package cn.isjinhao.crws.sql.grammar;

import cn.isjinhao.crws.sql.lexical.token.Token;
import java.util.List;

/**
 * @author 01395265
 * @date 2021/4/6
 */
public class AssignmentList extends CurdStatement{

    private List<Entry> entryList;

    public AssignmentList(List<Entry> entryList) {
        this.entryList = entryList;
    }

    @Override
    public <R> R accept(CurdStatementVisitor<R> curdStatementVisitor) {
        return curdStatementVisitor.visitEntryList(this);
    }

    public List<Entry> getEntryList() {
        return entryList;
    }

    public static class Entry {
        private Token columnName;
        private CurdStatement value;
        public Entry(Token columnName, CurdStatement value) {
            this.columnName = columnName;
            this.value = value;
        }
        public Token getColumnName() {
            return columnName;
        }
        public void setColumnName(Token columnName) {
            this.columnName = columnName;
        }
        public CurdStatement getValue() {
            return value;
        }
        public void setValue(CurdStatement value) {
            this.value = value;
        }
    }


}
